package com.yunhuakeji.wddx.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class IDhelper {
	public static String getID()
	{
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");//�������ڸ�ʽ
		return  df.format(new Date())+(new Random().nextInt(999) % (999 - 100 + 1) + 100);
	}
	public static String getID(String format)
	{
		SimpleDateFormat df = new SimpleDateFormat(format);//�������ڸ�ʽ
		return  df.format(new Date())+(new Random().nextInt(999) % (999 - 100 + 1) + 100);
	}
	public static String getTime(String format)
	{
		SimpleDateFormat df = new SimpleDateFormat(format);
		return  df.format(new Date());
	}
	
}
